<?php
namespace App\Models\Chain\PointCash;



use App\Models\Factory\CashFactory;
use App\Models\Factory\InviteFactory;
use App\Models\Chain\AbstractHandler;
use App\Strategies\CashStrategy;
use App\Strategies\PointStrategy;

/**
 * 更新现金表
 * Class CreateCreditLogAction
 * @package App\Models\Chain\Identity
 */

class UpdateUserAccountAction extends AbstractHandler
{
    private $params = array();

    protected $error = array('error' => '更新现金表', 'code' => 7011);


    public function __construct($params)
    {
        $this->params = $params;
    }

    public function handleRequest()
    {
        if ($this->updateUserAccount($this->params) == true) {

            return true;
        } else {
            return $this->error;
        }
    }

//更新现金表
    public function updateUserAccount($params)
    {

       $result = CashFactory::updateAccountCash($params);
        return $result;
    }


}